package cn.edu.njust.alg;

public class Gcd {

	public static int gcd(int p, int q) {
		if (q == 0) {
			return p;
		} else {
			return gcd(q, p % q);
		}
	}

	public static void main(String[] args) {
		int a = gcd(30, 5);
		System.out.println(a);
	}

}
